GINO Graphics Suite - GINO v9.0    

Windows Metafile (WMF)

Device Nominations

  Nomination Routine Description of Device
A gWmf (idpi, iwid, iheight) Standard metafile format
B gWmfp(idpi, ixoff, iyoff, iwidth, iheight) Placeable metafile format

Device Characteristics

  A and B
Maximum Width unlimited
Maximum Height unlimited
Default Width width dots
Default Height height dots
Colours / Pens 255
Colour Palette Static (default) or Direct
Broken Line Styles No
Drawing Modes 10 (XOR)
Thick Lines Yes
Line Ends Yes
Arcs No
Symbols No
Fonts A selection of hardware plus 5 registered (100, 101, 102, 150 and 151)
Character Sizes Any + 4 Pseudo-hardware in multiples of 8 pixels square
Character Angles Any
Italic Characters Yes (between 10 and 20)
Polygonal Filling Rectangles and single polygons - solid only
Segments No
Image Handling Output only
Clipping No


The WMF file format is used extensively within Microsoft Windows applications for storing vector based pictures. There are two formats, standard and placeable each of which can be generated on any platform with the two nomination routines provided with this driver.

The standard metafile (gWmf()) contains no scaling information and the dpi argument is required only to supply a scaling factor for GINO drawing purposes. Thus the drawing area as far as GINO is concerned is wid x height dots with dpi dots per inch, but the metafile simply contains a drawing area of wid  x height dots. All arguments are integer.

e.g. If your drawing is approximately A4 size (11" x 8"), and you will be viewing the resulting file in VGA mode (640 x 480), an example call would be:

gWmf(60,640,480)

The placeable metafile (gWmfp()) contains a prefix header containing offset, size and scaling information and this format is required by many Windows applications. xoff, yoff specify the offset from the top-left corner and by default would be set to 0,0.

Multiple Frames

The WMF file format does not recognise multiple frames and therefore gNewDrawing() has no effect.

Thick Lines and Line Ends

The MMF driver has been written to generate thick lines of all types, but the only true thick lines available through the GDI are those with round ends. Thus the no-ends and square-end types are generated by constructing a polygon of the required shape. To force the use of GDI thicklines use gSetLineEnd(GROUND).

Fonts

The default font used by the MWF driver is a fixed pitch, modern font which normally maps to Courier. A number of other hardware fonts have been built into the driver which may be selected using the routine gSetCharFontName(), with the available list obtained through the routine gEnqFontNameList(). In addition, the following list of registered fonts are available through the routine gSetCharFont() :

Font Number Font Name
0 or 100 Courier (fixed-pitch)
101 Swiss
102 Roman
150 Arial
151 Times New Roman

The routine gSetFontWeight(weight) can also be used to select a thin or bold version of the font with the value of weight being permitted in the range of -7 to 7, with 0 being the default thickness.

Note that, although over 100 hardware font tables have been built into this driver, the final form of a font face will depend on the typefaces available when interpreting the WMF file. This is due to the fact that the driver has been written to operate off-line on any computer system. It is therefore possible to select a font when creating the metafile that is not available at the time of interpretation and so will be replaced by one that is, with possible slight differences in appearance and dimensions.